﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace QuickFramework.SqlSugarOrm
{
    public partial class Repository<T>
    {
        #region Deleteable
        public IDeleteable<T> Deleteable(IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Deleteable<T>();
        }
        public IDeleteable<T> Deleteable(dynamic primaryKeyValue, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Deleteable<T>(primaryKeyValue);
        }
        public IDeleteable<T> Deleteable(dynamic[] primaryKeyValues, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Deleteable<T>(primaryKeyValues);
        }
        public IDeleteable<T> Deleteable(Expression<Func<T, bool>> expression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Deleteable<T>(expression);
        }
        public IDeleteable<T> Deleteable(List<dynamic> pkValue, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Deleteable<T>(pkValue);
        }
        public IDeleteable<T> Deleteable(List<T> deleteObjs, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Deleteable<T>(deleteObjs);
        }
        public IDeleteable<T> Deleteable(T deleteObj, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Deleteable<T>(deleteObj);
        }
        #endregion

        #region Insertable
        public IInsertable<T> Insertable(Dictionary<string, object> columnDictionary, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Insertable<T>(columnDictionary);
        }
        public IInsertable<T> Insertable(dynamic insertDynamicObject, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Insertable<T>(insertDynamicObject);
        }
        public IInsertable<T> Insertable(List<T> insertObjs, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Insertable<T>(insertObjs);
        }
        public IInsertable<T> Insertable(T insertObj, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Insertable<T>(insertObj);
        }
        public IInsertable<T> Insertable(T[] insertObjs, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Insertable<T>(insertObjs);
        }
        #endregion

        #region Queryable
        public ISugarQueryable<T> SqlQueryable(string sql, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.SqlQueryable<T>(sql);
        }
        public ISugarQueryable<ExpandoObject> Queryable(string tableName, string shortName, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable(tableName, shortName);
        }
        public ISugarQueryable<T> Queryable(IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T>();
        }
        public ISugarQueryable<T> Queryable(ISugarQueryable<T> queryable, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable(queryable);
        }
        public ISugarQueryable<T> Queryable(string shortName, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T>(shortName);
        }
        #endregion

        #region Saveable
        public ISaveable<T> Saveable(List<T> saveObjects, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Saveable(saveObjects);
        }
        public ISaveable<T> Saveable(T saveObject, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Saveable(saveObject);
        }
        #endregion

        #region Queue
        public QueueList Queues(IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queues;
        }
        public void AddQueue(string sql, object parsmeters = null, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            uow.SqlSugarClient.AddQueue(sql);
        }
        public void AddQueue(string sql, List<SugarParameter> parsmeters, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            uow.SqlSugarClient.AddQueue(sql, parsmeters);
        }
        public void AddQueue(string sql, SugarParameter parsmeter, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            uow.SqlSugarClient.AddQueue(sql, parsmeter);
        }
        public int SaveQueues(IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.SaveQueues();
        }
        public Task<int> SaveQueuesAsync(IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.SaveQueuesAsync();
        }
        #endregion

        #region Queryable
        public ISugarQueryable<T1> SqlQueryable<T1>(string sql, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.SqlQueryable<T1>(sql);
        }
       public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8, T9> Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8, T9>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8> Queryable<T1, T2, T3, T4, T5, T6, T7, T8>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8> Queryable<T1, T2, T3, T4, T5, T6, T7, T8>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7, T8> Queryable<T1, T2, T3, T4, T5, T6, T7, T8>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7, T8>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7> Queryable<T1, T2, T3, T4, T5, T6, T7>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7> Queryable<T1, T2, T3, T4, T5, T6, T7>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6, T7> Queryable<T1, T2, T3, T4, T5, T6, T7>(Expression<Func<T1, T2, T3, T4, T5, T6, T7, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6, T7>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6> Queryable<T1, T2, T3, T4, T5, T6>(Expression<Func<T1, T2, T3, T4, T5, T6, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6> Queryable<T1, T2, T3, T4, T5, T6>(Expression<Func<T1, T2, T3, T4, T5, T6, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5, T6> Queryable<T1, T2, T3, T4, T5, T6>(Expression<Func<T1, T2, T3, T4, T5, T6, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5, T6>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5> Queryable<T1, T2, T3, T4, T5>(Expression<Func<T1, T2, T3, T4, T5, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5> Queryable<T1, T2, T3, T4, T5>(Expression<Func<T1, T2, T3, T4, T5, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4, T5> Queryable<T1, T2, T3, T4, T5>(Expression<Func<T1, T2, T3, T4, T5, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4, T5>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4> Queryable<T1, T2, T3, T4>(Expression<Func<T1, T2, T3, T4, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()

        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4> Queryable<T1, T2, T3, T4>(Expression<Func<T1, T2, T3, T4, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)

        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3, T4> Queryable<T1, T2, T3, T4>(Expression<Func<T1, T2, T3, T4, object[]>> joinExpression, IUnitOfWork unitOfWork = null)

        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3, T4>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3> Queryable<T1, T2, T3>(Expression<Func<T1, T2, T3, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()

        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3> Queryable<T1, T2, T3>(Expression<Func<T1, T2, T3, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3>(joinExpression);
        }
        public ISugarQueryable<T1, T2, T3> Queryable<T1, T2, T3>(Expression<Func<T1, T2, T3, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2, T3>(joinExpression);
        }
        public ISugarQueryable<T1, T2> Queryable<T1, T2>(Expression<Func<T1, T2, bool>> joinExpression, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2>(joinExpression);
        }
        public ISugarQueryable<T1, T2> Queryable<T1, T2>(Expression<Func<T1, T2, JoinQueryInfos>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2>(joinExpression);
        }
        public ISugarQueryable<T1, T2> Queryable<T1, T2>(Expression<Func<T1, T2, object[]>> joinExpression, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2>(joinExpression);
        }
        public ISugarQueryable<T1, T2> Queryable<T1, T2>(ISugarQueryable<T1> joinQueryable1, ISugarQueryable<T2> joinQueryable2, Expression<Func<T1, T2, bool>> joinExpression, IUnitOfWork unitOfWork = null)
            where T1 : class, new()
            where T2 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2>(joinExpression);
        }
        public ISugarQueryable<T1, T2> Queryable<T1, T2>(ISugarQueryable<T1> joinQueryable1, ISugarQueryable<T2> joinQueryable2, JoinType joinType, Expression<Func<T1, T2, bool>> joinExpression, IUnitOfWork unitOfWork = null)
            where T1 : class, new()
            where T2 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1, T2>(joinExpression);
        }
        public ISugarQueryable<T1> Queryable<T1>(IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1>();
        }
        public ISugarQueryable<T1> Queryable<T1>(ISugarQueryable<T1> queryable, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1>(queryable);
        }
        public ISugarQueryable<T1> Queryable<T1>(string shortName, IUnitOfWork unitOfWork = null) where T1 : class, new()
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Queryable<T1>(shortName);
        }
        #endregion

        #region Updateable
        public IUpdateable<T> Updateable(IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Updateable<T>();
        }
        public IUpdateable<T> Updateable(Dictionary<string, object> columnDictionary, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Updateable<T>(columnDictionary);
        }
        public IUpdateable<T> Updateable(dynamic updateDynamicObject, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Updateable<T>(updateDynamicObject);
        }
        public IUpdateable<T> Updateable(Expression<Func<T, bool>> columns, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Updateable<T>(columns);
        }
        public IUpdateable<T> Updateable(Expression<Func<T, T>> columns, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Updateable<T>(columns);
        }
        public IUpdateable<T> Updateable(List<T> UpdateObjs, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Updateable<T>(UpdateObjs);
        }
        public IUpdateable<T> Updateable(T UpdateObj, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Updateable<T>(UpdateObj);
        }
        public IUpdateable<T> Updateable(T[] UpdateObjs, IUnitOfWork unitOfWork = null)
        {
            IUnitOfWork uow = unitOfWork;
            if (null == unitOfWork)
            {
                uow = this.UnitOfWork;
            }
            return uow.SqlSugarClient.Updateable<T>(UpdateObjs);
        }
        #endregion
    }
}
